package com.example.sxproject.service.impl;

import com.example.sxproject.mapper.CardMapper;
import com.example.sxproject.mapper.RecipientMapper;
import com.example.sxproject.pojo.Card;
import com.example.sxproject.pojo.FinancialProduct;
import com.example.sxproject.pojo.Recipient;
import com.example.sxproject.service.FinancialService;
import com.example.sxproject.service.RecipientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RecipientServiceImpl implements RecipientService {

    @Autowired
    private RecipientMapper recipientMapper;

    //查询select：根据用户名查找
    @Override
    public List<Recipient> selectByUserId(Integer userId) {
        return recipientMapper.selectByUserId(userId);
    }

    //添加：添加一个收款人
    @Override
    public void addRecipient(Recipient recipient) {
        recipientMapper.addRecipient(recipient);
    }

    //更新：更新收款人信息
    @Override
    public void updateRecipient(Recipient recipient) {
        recipientMapper.updateRecipient(recipient);
    }

    //更新：假删除
    @Override
    public void delete(Recipient recipient) {
        recipientMapper.delete(recipient);
    }


}
